package com.aos.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;

/**
 * @author xkz
 * @Date 15:22 2018/9/3
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("Swagger类测试")
public class SwaggerTestEntity {

    @ApiModelProperty("姓名")
    @Size(max = 20)
    private String name;

    @ApiModelProperty("年龄")
    @Max(150)
    @Min(1)
    private Integer age = 0;

    @NotNull
    @Size(max = 200)
    private String address;

    @Pattern(regexp = "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$")
    @Size(max = 200)
    private String email;
}
